<html>

<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <title>Angular Gridster</title>
    <meta name="description" content="" />
    <meta name="viewport" content="width=device-width" />

    <link rel="stylesheet" href="dist/angular-gridster.min.css" />
    <link rel="stylesheet" href="demo/common/style.css" />
	<link rel="stylesheet" href="demo/main/style.css" />

<!--
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
    <script src="https://rawgit.com/sdecima/javascript-detect-element-resize/master/detect-element-resize.js"></script>
-->
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.15/angular.js"></script>

    <script src="src/angular-gridster.js"></script>

    <script type="text/javascript">
        (function() {
        	angular.module('app', ['gridster']);
        })();
    </script>

    <script src="demo/main/script.js"></script>
</head>

<body ng-app="app">
    <div >
        <div class="container" ng-view>
			<div class="demo-container" ng-controller="MainCtrl">
				<h2>Standard Items</h2>
				<p>
					Each item provides its own dimensions and position using the standard fields: { row: row, col: col, sizeX: sizeX, sizeY: sizeY }.
				</p>
				<div gridster="gridsterOpts">
					<ul>
						<li gridster-item="item" ng-repeat="item in standardItems">
							<div class="remove-item" ng-click="removeItem($index)"> x </div>
							<input type="text" integer ng-model="item.row" size="1" />,
							<input type="text" integer ng-model="item.col" size="1" />
							<br />
							<input type="text" integer ng-model="item.sizeX" size="1" />x
							<input type="text" integer ng-model="item.sizeY" size="1" />
						</li>
					</ul>
				</div>

				<h2>Custom Items</h2>
				<p>
					Each item provides its own dimensions but with custom fields defined using customItemMap: { position: [row, col], size: { x: sizeX, y: sizeY }}
				</p>
				<div gridster="gridsterOpts">
					<ul>
						<li gridster-item="customItemMap" ng-repeat="item in customItems">
							<input type="text" integer ng-model="item.position[0]" size="1" />,
							<input type="text" integer ng-model="item.position[1]" size="1" />
							<br />
							<input type="text" integer ng-model="item.size.x" size="1" />x
							<input type="text" integer ng-model="item.size.y" size="1" />
						</li>
					</ul>
				</div>

				<h2>Custom Items2</h2>
				<p>
					Each item provides its own dimensions but with custom fields indicated using html attributes: row, col, sizex, sizey. Size can also be in the form of data-size-x or data-sizex.
				</p>
				<div gridster="gridsterOpts">
					<ul>
						<li gridster-item row="item.position[0]" col="item.position[1]" size-x="item.size.x" size-y="item.size.y" ng-repeat="item in customItems">
							<input type="text" integer ng-model="item.position[0]" size="1" />,
							<input type="text" integer ng-model="item.position[1]" size="1" />
							<br />
							<input type="text" integer ng-model="item.size.x" size="1" />x
							<input type="text" integer ng-model="item.size.y" size="1" />
						</li>
					</ul>
				</div>

				<h2>Empty Items</h2>
				<p>
					Each item stores the standard options as an object within itself: { grid: {row: row, col: col, sizeX: sizeX, sizeY: sizeY }}
				</p>
				<div gridster="gridsterOpts">
					<ul>
						<li gridster-item="item.grid" ng-repeat="item in emptyItems">
							<input type="text" integer ng-model="item.grid.row" size="1" />,
							<input type="text" integer ng-model="item.grid.col" size="1" />
							<br />
							<input type="text" integer ng-model="item.grid.sizeX" size="1" />x
							<input type="text" integer ng-model="item.grid.sizeY" size="1" />
						</li>
					</ul>
				</div>

				<h2>No Configuration or Binding</h2>
				<p>
					No data binding or configuration provided.
				</p>
				<div gridster>
					<ul>
						<li gridster-item></li>
					</ul>
				</div>
			</div>
		</div>

    </div>
</body>

</html>
